﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Threading;
using CCWP7.Service.Model;

namespace CCWP7.Service
{
    public class Global : System.Web.HttpApplication
    {
        Timer timer;

        public Global()
        {
            timer = new Timer(OnTimer, null, TimeSpan.FromSeconds(0), 
                TimeSpan.FromSeconds(60));  // TODO: Global config or per-project?
        }

        void OnTimer(object param)
        {
            var db = new CCNetDb();

            foreach (var server in db.Servers)
            {

            }
        }

        protected void Application_Start(object sender, EventArgs e)
        {
            
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}